package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author ct_start
 * @create 2021 -08 -17
 **/

// 给这个接口加上实现类 触发里面的服务降级和熔断之后产生的兜底的方法

@Component
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class) // 调用服务的名字
public interface VodClient {
    // 根据视频Id 删除阿里云里面的视频
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    public R removeAlyVideo(@PathVariable("id") String id);

    // 删除多个视频的操作
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam List<String> videoIdList);



}
